package br.com.array.android.ma.view.activity;

import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.view.MenuItem;
import br.com.array.android.ma.R;

/**
 * Created by leonardo.neves on 05/08/2014.
 */
public class ConfiguracaoPreferenceActivity extends PreferenceActivity {


    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        addPreferencesFromResource(R.xml.configuracao);
        getActionBar().setDisplayHomeAsUpEnabled(true);
        getActionBar().setTitle("Configurações");
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()){
            case android.R.id.home:
                finish();
                return true;
            default:
                return super.onOptionsItemSelected(item);
        }
    }
}